home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / cdrtools-1.10 / Linux.scsi-patch < prev    next >
Encoding:
Text File  |  1997-09-01  |  994 b   |  27 lines

  1. --- linux/include/scsi/scsi.h.orig    Wed Jul 16 18:46:52 1997
  2. +++ linux/include/scsi/scsi.h    Wed Jul 16 18:50:50 1997
  3. @@ -180,6 +180,8 @@
  4.  /* Used to obtain the host number of a device. */
  5.  #define SCSI_IOCTL_PROBE_HOST 0x5385
  6.  
  7. +/* Used to get the bus number for a device */
  8. +#define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
  9.  
  10.  /*
  11.   * Overrides for Emacs so that we follow Linus's tabbing style.
  12.  
  13. --- linux/drivers/scsi/scsi_ioctl.c.orig    Wed Jul 16 18:33:46 1997
  14. +++ linux/drivers/scsi/scsi_ioctl.c    Wed Jul 16 18:46:11 1997
  15. @@ -343,6 +343,11 @@
  16.              (unsigned long *) arg);
  17.          put_user( dev->host->unique_id, (unsigned long *) arg+1);
  18.      return 0;
  19. +    case SCSI_IOCTL_GET_BUS_NUMBER:
  20. +        result = verify_area(VERIFY_WRITE, (void *) arg, sizeof(int));
  21. +        if (result) return result;
  22. +        put_user( dev->host->host_no, (int *) arg);
  23. +    return 0;
  24.      case SCSI_IOCTL_TAGGED_ENABLE:
  25.      if(!suser())  return -EACCES;
  26.      if(!dev->tagged_supported) return -EINVAL;
  27.